window.onload = function (){
    var info = getQuery("loginError");
    if(info == "noCustom"){
        $("errorDiv").innerHTML = "请以顾客身份登陆";
    }
    else if(info == "noManager"){
        $("errorDiv").innerHTML = "请以管理员身份登陆";
    }
    else if(info == "noSend"){
        $("errorDiv").innerHTML = "请以送货员身份登陆";
    }

}

function land(){
    axios.get("/user/login",{
        params:{
            userName:$("userName").value,
            pwd:$("pwd").value
        }
    }).then(e =>{
        if(e.data == "ok"){
            location.href = "/index.html";
        }
        else{
            $("errorDiv").innerHTML = "登陆失败";
        }
    });
}